package com.cqw.auth.enums;

import com.power.common.interfaces.IMessage;

/**
 * Error code enum
 * @author 11700 on 2020/12/30.
 */
public enum CodeEnum implements IMessage {

    SUCCESS("10000", "success"),

    PARAM_EMPTY("10001", "必选参数为空"),

    PARAM_ERROR("10002", "参数格式错误"),

    USER_NOT_EXIST_FAILURE("10003", "账号或者密码错误"),
    USER_NOT_LOGIN_FAILURE("10004", "认证失败"),
    USER_LOGIN_SUCCESS("10000", "登录成功"),
    AUTHORIZE_FAILURE("10006", "没有权限"),
    LOGOUT_SUCCESS("10000", "注销成功"),

    UNKNOWN_ERROR("99999", "系统繁忙，请稍后再试....");


    private String code;
    private String message;


    CodeEnum(String errCode, String errMsg) {
        this.code = errCode;
        this.message = errMsg;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }
}
